/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.scalan;

import net.scalan.jpa.model.DBSchemObject;
import net.scalan.jpa.model.DBSchemObjectController;
import net.scalan.jpa.model.DBTest;
import net.scalan.jpa.model.DBTestController;

/**
 *
 * @author scalan
 */
public class Main {
    public void doTest(){
        System.out.println("!!!!!!!!!!!!!!!!");
        // TODO code application logic here
        DBTest record = new DBTest();
        record.setName("test...");
        DBTestController dbTestController = new DBTestController();
        dbTestController.create(record);

        int generateSchemObjects = 5;
        // SchemObjects
        DBSchemObjectController dbSchemObjectController = new DBSchemObjectController();
        for (int i = 0; i < generateSchemObjects; i++) {
            int x = (int) (Math.random() * 1000);
            int y = (int) (Math.random() * 750);
            DBSchemObject schemObject = new DBSchemObject();
            schemObject.setName("SchemObject_" + i);
            schemObject.setX((int) (Math.random() * 1000));
            schemObject.setY((int) (Math.random() * 750));
            dbSchemObjectController.create(schemObject);
        }
    }
}
